Low-Pin-Count Non-Volatile Memory Embedded in a Integrated Circuit without any Additional Pins for Access

ABSTRACT

A low-pin-count non-volatile memory (NVM) embedded an integrated circuit can be accessed without any additional pins. The NVM has one or more memory cells and at least one of the NVM cells can have at least one NVM element coupled to at least one selector and to a first supply voltage line. The selector can be coupled to a second supply voltage line and has a selecting signal. The integrated circuit can include at least one test mode detection circuit to activate a test mode upon detecting an abnormal (or out of normal) operation condition(s). Once a test mode is activated, at least one I/O or supply voltage of the integrated circuit can be used as the I/O or supply voltage of the NVM to select at least one NVM cell for read, program into nonvolatile, or volatile state. At least one NVM cell can be read during ramping of at least one supply voltage line.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation-in-part of U.S. patent applicationSer. No. 13/288,843, filed on Nov. 3, 2011 and entitled “Low-Pin-CountNon-Volatile Memory Interface,” which incorporated herein as reference,and which claims priority benefit of U.S. Provisional Patent ApplicationNo. 61/409,539, filed on Nov. 3, 2010 and entitled “Circuit and Systemof A Low Pin Count One-Time-Programmable Memory,” which is herebyincorporated herein by reference.

This application also claims priority benefit of U.S. Provisional PatentApplication No. 61/806,914, filed on Mar. 31, 2013 and entitled“Low-Pin-Count Non-Volatile Memory Interface With Two Pins Only,” whichis hereby incorporated herein by reference.

This application is also related to U.S. patent application Ser. No.______, filed on Mar. 31, 2014 and entitled “Low-Pin-Count Non-VolatileMemory Interface With Soft Programming Capability,” which is herebyincorporated herein by reference.

BACKGROUND OF THE RELATED ART

Non-volatile memory (NVM) is able to retain data when the power supplyof a memory is cut off. The memory can be used to permanent store datasuch as parameters, configuration settings, long-term data storage, etc.Similarly, this kind of memory can be used to store instructions, orcodes, for microprocessors, DSPs, or microcontrollers (MCU), etc.Non-volatile normally has three operations, read, write (or calledprogram), and erase, for reading data, programming data, and erasingdata before re-programming. Non-volatile memory can be an EPROM, EEPROM,or flash memory that can be programmed from 10K to 100K times, orMultiple-Time Programmable (MTP) to be programmed from a few times to afew hundred times, or One-Time Programmable (OTP) to be programmed onetime only. The non-volatile memory can also be emerging memories such asPCRAM (Phase Change RAM), RRAM (Resistive RAM), FRAM (FerroelectricRAM), or MRAM (Magnetic RAM).

One-Time-Programmable (OTP) is a particular type of non-volatile memorythat can be programmed only once. An OTP memory allows the memory cellsbeing programmed once and only once in their lifetime. OTP is generallybased on standard CMOS processes and is usually embedded into anintegrated circuit that allows each die in a wafer to be customized.There are many applications for OTP, such as memory repair, devicetrimming, configuration parameters, chip ID, security key, featureselect, and PROM, etc.

FIG. 1 shows a conventional low-pin-count OTP memory 6. The OTP memory 6has a shared pin 7 and a plurality of OTP cells that has a program pad 8and an OTP element 5 for each cell. The OTP element is usually anelectrical fuse that is fabricated from polysilicon, silicidedpolysilicon, or metal in CMOS processes. To program a fuse, a highvoltage can be applied to the pad 8 to conduct a high current flowingthrough the OTP element 5 to break the fuse into a high resistancestate. In 0.35 um CMOS, programming a polycide (i.e. polysilicon withsilicide on top) fuse takes about 60 mA for 100 millisecond. The programcurrent is so high that the shared pin or the nearby interlayerdielectric can be damaged. The area for a one-pad-one-fuse OTP cell isalso very large, especially for low-pin-count chips.

FIG. 2( a) shows another conventional NVM cell 10. The NVM cell 10 hasan NVM element 11 and a program selector 12. The NVM element 10 iscoupled to a supply voltage V+ in one end and to a program selector 12in the other end. The program selector 12 has the other end coupled to asecond supply voltage V−. The program selector 12 can be turned on byasserting a control terminal Sel. The program selector 12 is usuallyconstructed from a MOS device. The NVM element 11 is usually anelectrical fuse based on polysilicon, silicided polysilicon, metal, afloating gate to store charges, or an anti-fuse based on gate oxidebreakdown, etc.

FIG. 2( b) shows an NVM cell 15 using a diode as program selector, whichis well suited for a low-pin-count NVMt. The NVM cell 15 has an NVMelement 16 and a diode as a program selector 17. The NVM element 16 iscoupled to a supply voltage V+ in one end and a program selector 17 inthe other. The program selector 17 has the other end coupled to a secondsupply voltage V− as a select signal Sel. It is very desirable for theprogram selector 17 being fabricated in CMOS compatible processes. Theprogram selector 17 can be constructed from a diode that can be embodiedas a junction diode with at least one P+ active region on an N well, ora diode with P+ and N+ implants on two ends of a polysilicon substrateor active region on an insulated substrate. The NVM element 16 iscommonly an electrical fuse based on polysilicon, silicided polysilicon,metal, CMOS gate material, or anti-fuse based on gate oxide breakdown.

FIG. 2( c) shows a block diagram of a typical low-pin-count NVM cell 130for a low-pin-count NVM memory. The NVM cell 130 has one NVM element 131coupled to a supply voltage VDDP in one end and to a selector 132 in theother end as Vx. The selector 132 can be enabled by asserting a signalSel. The node Vx can be coupled to a sense amplifier 133 and then to alatch 134 by a signal RE. For low-pin-count NVMs, there may be someadvantages to build a sense amplifier and a latch into each cell to savethe overall costs in a macro and for ease to use.

FIG. 3 shows a pin configuration of a conventional serial OTP memory 20.The OTP memory 20 has an OTP memory module 22 and a power-switch device21 that couples to a high voltage supply VDDP and the OTP memory module22. The OTP memory 22 has a chip enable, program, clock, power-switchselect, and an output signal denoted as CS#, PGM, CLK, PSWS, and Q,respectively. CS# selects the OTP memory 22 for either read or program.PGM is for program or read control. CLK is for clocking the memory 22.PSWS is for turning on an optional device, power-switch device 21. Theoutput signal Q is for outputting data. Since there are several I/Opins, the footprint of an OTP memory to be integrated into an integratedcircuit is large and the cost is relatively high. Sometimes, the PSWSsignal can be generated from the OTP memory 22.

FIG. 4( a) shows a program timing waveform of a serial OTP memory withthe I/O pin configurations as shown in FIG. 3. If the CLK is low and PGMis high when the CS# falls, the OTP goes into a program mode. Then, PGMtoggles to high before the rising edges of CLK for those bits to beprogrammed. The high CLK period is the actual program time. Similarly,FIG. 4( b) shows a read timing waveform of a serial OTP memory with theI/O pin configurations shown in FIG. 3. If the CLK is high and PGM islow when CS# falls, the OTP goes into a read mode. The cell data areread out at the falling edges of CLK one by one. These timing waveformsin FIGS. 4( a) and 4(b) are relatively complicated.

Another similar low-pin-count I/O interface is the Serial PeripheralInterconnect (SPI) that has CSB, SCLK, SIN, and SO pins for chip select,serial clock, serial input, and serial output, respectively. The timingwaveforms of SPI are similar to those in FIGS. 4( a) and 4(b). Anothertwo-pin serial I/O interface is I²C that has only two pins: SDA and SCL,for serial data and serial clock, respectively. This I/O interface isfor SRAM-like devices that have comparable read and write access time.The I²C for programming a byte or a page in a serial EEPROM is quitecomplicated: upon issuing a start bit, device ID, program bit, startaddress, and stop bit, the chip goes into hibernation so that aninternally generated programming can be performed for about 4-8 ms. Astatus register can be checked for completion before next programcommands can be issued again. In an OTP memory, the program time isseveral orders of magnitude higher than the read access and much lowerthan either the program or erase time of an EEPROM, for example 1 us forOTP programming versus 50 ns for OTP read and 1 us for OTP programmingversus 4 ms for flash programming/erasing, such that I²C interface forOTP is not desirable because of high timing overhead.

As NVM memory sizes continue to be reduced, the number of externalinterface pins becomes a limitation to the NVM memory size. Theconventional serial interfaces are relatively complex and are not ableto effectively accommodate read and program speed discrepancies.Accordingly, there is a need for a low-pin-count interface fornon-volatile memory, such as OTP memory.

SUMMARY

The invention relates to a low-pin-count non-volatile memory (NVM)having reduced area and footprint. For example, in one embodiment, alow-pin-count NVM can have no more than 256 bits, or more particularlyno more than 32 bits, and can be used for one or more of devicetrimming, calibration, configuration settings, parameter storage,security key, product feature select, chip ID, or the like. In oneembodiment, the low-pin-count non-volatile memory can use an interfacethat makes use of not more than three pins (i.e. VDDP, CLK, PGM)external to an integrated circuit. In another embodiment, alow-pin-count NVM can use an interface that makes use of not more thantwo pins (i.e. VDDP and CLK) external to an integrated circuit. Theinterface not only can use at most a few external pins but also canshare several internal pins with the rest of integrated circuit tothereby reduce area and footprint For example, if desired, the two orthree external pins can be further multiplexed with the other pins sothat effectively no additional pins are needed for the NVM interface. Inone embodiment the interface can pertain to a low-pin-count One-TimeProgrammable (OTP) interface for an OTP memory so that the OTP memorycan be easily integrated into an integrated circuit.

In one embodiment, a low-pin-count non-volatile memory interface can usea minimum of three signals, PGM, CLK, and VDDP for program control,clock, and high voltage, respectively. By comparing the relative phasebetween PGM and CLK, start and stop conditions can be detected. Inaddition, device ID, read/program/erase mode, and starting address canbe determined. Thereafter, read, program, or erase sequences can beproperly generated. Program assertion and program time can be determinedby the pulse width of PGM. So do the erase mode. Finally, the operationscan be ended with a stop condition or running out of the availablememory space.

In another embodiment, a low-pin-count non-volatile memory interface canuse a minimum of only two signals, VDDP and CLK for program voltagesupply and clock, respectively. The NVM memory can be reset to aninitial state to select a particular cell. Any subsequent CLK togglescan select the next NVM cells. The selected NVM cells can be enabledwhen the CLK is high. If VDDP is raised to a high program voltage forthose cells enabled by CLK, the cells can be programmed accordingly. IfVDDP is raised to a core voltage not high enough for programming, thecells enabled by CLK can be soft-programmed accordingly. Softprogramming allows each cell being stored with data for test andverification until satisfaction. Then actual programming can follow.Read can be done by raising a Read Enable signal (RE) to the NVM macroso that all cells in the NVM can be sensed and stored into eachindividual latch. Alternatively, RE can be a Power-On Reset (POR) signalthat can be generated automatically during VDD powering up.

In yet another embodiment, a low-pin-count nonvolatile memory (NVM) canbe embedded into an integrated circuit by full utilizing the existingpin configuration. A combination of unusual voltage levels or timingscan be latched for a few consecutive times to get into a test mode. Onceinto the test mode, the I/Os of the existing pin configuration can beused as the I/Os of the embedded NVM. Reading the contents of the NVMcan be activated by a ramping up of a supply voltage VDD. In thisembodiment, either CLK/PGM/VDDP or CLK/VDDP scheme can be readilyapplied after going into the test mode.

The invention can be implemented in numerous ways, including as amethod, system, device, or apparatus (including graphical user interfaceand computer readable medium). Several embodiments of the invention arediscussed below.

As a low-pin-count nonvolatile memory (NVM) integrated in an integratedcircuit, wherein the NVM has a test mode, one embodiment can, forexample, include one or more NVM cells. At least one of the NVM cellscan include an NVM element coupled to a first supply voltage line, and aselector coupled to the NVM element and a second supply voltage linehaving a select signal. The NVM can also include at least one test modedetection circuit to detect abnormal operational conditions and toactivate a test mode based on the detected abnormal operationalconditions. At least one I/O or supply voltage pins of the integratedcircuit can be configured to be used as the I/O or supply voltage of theNVM to generate at least one select signal to select at least one NVMcells after the test mode is activated.

As a low-pin-count nonvolatile memory (NVM), one embodiment can, forexample, include a plurality of NVM cells. At least one of the NVM cellscan include an NVM element coupled to a selector. One embodiment of alow-pin-count NVM has a PGM, CLK, and VDDP pins for program/erasecontrol, clock, and high voltage supply, respectively. With relativephases between PGM and CLK, a start/stop bit condition can bedetermined. Upon detecting a start bit, various transaction phases ofdevice ID, access patterns, and start address can be determined andfollowed by actual data cycles to read, program, or erase the NVM cellssequentially. Finally, the transaction can be ended by detecting a stopcondition or running out of the available NVM memory space.

As a low-pin-count nonvolatile memory (NVM), another embodiment can, forexample, include a plurality of NVM cells. At least one of the NVM cellscan include an NVM element coupled to a selector. Each NVM cell can beselected by a CLK signal upon initialization, such as VDD powering up.The CLK can select a next NVM cell after each CLK transition. Eachselected NVM cell can be enabled during the CLK high period. If the VDDPis raised to a high program voltage during the CLK high period, theselected NVM cells can be programmed accordingly. If the VDDP is raisedto a core voltage during the CLK high period, the selected NVM cells canbe soft programmed. Soft programming is a capability to allow data beingentered and stored for testing and verifying the functionality untilsatisfaction. Then actually programming can follow afterward. Read canbe done by raising a Read Enable (RE) signal to sense and store thecontents of all cells in the NVM. Alternatively, RE can be triggered bya Power-On Reset (POR) signal during VDD powering up to a core voltage.

As a low-pin-count nonvolatile memory (NVM), yet another embodiment can,for example, include a test mode detector. The test mode detector candetect and latch a combination of voltage levels and/or timings thatshould never happen in normal conditions. To prevent any glitches tomis-trigger into the test mode, the unusual conditions need to happen afew consecutive times to go to the test mode. Once in the test mode, theI/Os of the existing integrated circuits can be used as I/Os of theembedded NVM. This embodiment can work with VDDP/CLK/PGM or VDD/CLKscheme once in the test mode. Reading the contents of the NVM can beactivated by a ramping up of a supply voltage, such as VDD, so that noadditional pins are needed.

As an electronic system, one embodiment can, for example, include atleast a processor, and at least one low-pin-count nonvolatile memory(NVM) operatively connected to the processor. At least one of the NVMcells can include an NVM element coupled to a first supply voltage line,and a selector coupled to the NVM element and a second supply voltageline having a select signal. The electronic system can further includeat least one test mode detection circuit to detect out of normaloperational conditions to activate a test mode. At least one I/O pins orsupply voltages in the integrated circuit can be used to generate atleast one select signal to select at least one of the NVM cells of theNVM while the test mode is activated.

As an electronic system, one embodiment can, for example, include atleast a processor, and a low-pin-count nonvolatile memory (NVM)operatively connected to the processor. At least one of the NVM cellscan include an NVM element coupled to a selector. One embodiment of alow-pin-count NVM has a PGM, CLK, and VDDP pins for program/erasecontrol, clock, and high voltage supply, respectively. With relativephases between PGM and CLK, a start/stop bit condition can bedetermined. Upon detecting a start bit, various transaction phases ofdevice ID, access patterns, and start address can be determined andfollowed by actual data cycles to read, program, or erase the NVM cellssequentially. Finally, the transaction can be ended by detecting a stopcondition or running out of the available NVM memory space.

As an electronic system, another embodiment can, for example, include atleast a processor, and a low-pin-count nonvolatile memory (NVM)operatively connected to the processor. At least one of the NVM cellscan include an NVM element coupled to a selector. An NVM cell can beselected by CLK upon initialization, such as VDD powering up. The CLKcan select the next NVM cells after each CLK transition. Each selectedNVM cell can be enabled during the CLK high period. If the VDDP israised to a high program voltage during the CLK high period, theselected NVM cells can be programmed accordingly. If the VDDP is raisedto a core voltage during the CLK high period, the selected NVM cells canbe soft programmed. Soft programming is a capability to allow data beingentered and stored for testing and verifying the functionality untilsatisfaction. Then actually programming can follow afterward. Read canbe done by raising a Read Enable (RE) signal to sense and store thecontents of all cells in the NVM. Alternatively, RE can be triggered bya Power-On Reset (POR) signal during VDD powering up to a core voltage.

As an electronic system, yet another embodiment can, for example,include a test mode detector. The test mode detector can detect andlatch a combination of voltage levels and/or timings that should neverhappen in normal conditions. To prevent any glitches to mis-trigger intothe test mode, the unusual conditions need to happen a few consecutivetimes to go to the test mode. Once in the test mode, the I/Os of theexisting integrated circuits can be used as I/Os of the embedded NVM.This embodiment can work with VDDP/CLK/PGM or VDD/CLK scheme once in thetest mode. Reading the contents of the NVM can be activated by a rampingup of a supply voltage, such as VDD, so that no additional pins areneeded. The test mode detector can be built into the NVM in oneembodiment.

As a method for providing a low-pin-count nonvolatile memory (NVM) in anintegrated circuit, one embodiment can, for example, include at leastproviding one or more NVM cells. At least one of the NVM cells caninclude an NVM element coupled to a first supply voltage line, and aselector coupled to the NVM element and a second supply voltage linehaving a select signal. The embodiment can further include detectingabnormal operation conditions of the NVM, and activating a test mode ifthe detecting detects the abnormal operation conditions. Furthermore, atleast one I/O or supply voltage of the integrated circuit can be used asthe I/O or supply voltage of the NVM to select at least one of the NVMcells after the test mode has been activated.

As a method for providing a low-pin-count nonvolatile memory (NVM), oneembodiment can, for example, include at least providing a plurality ofNVM cells. At least one of the NVM cells can include an NVM elementcoupled to a selector. One embodiment of a low-pin-count NVM has a PGM,CLK, and VDDP pins for program/erase control, clock, and high voltagesupply, respectively. With relative phases between PGM and CLK, astart/stop bit condition can be determined. Upon detecting a start bit,various transaction phases of device ID, access patterns, and startaddress can be determined and followed by actual data cycles to read,program, or erase the NVM cells sequentially. Finally, the transactioncan be ended by detecting a stop condition or running out of theavailable NVM memory space.

As a method for providing a low-pin-count nonvolatile memory (NVM),another embodiment can, for example, include at least providing aplurality of NVM cells. At least one of the NVM cells can include an NVMelement coupled to a selector. Each NVM cell can be selected by a CLKsignal upon initialization, such as VDD powering up. The CLK can selectthe next NVM cells after each CLK transition. Each selected NVM cell canbe enabled during the CLK high period. If the VDDP is raised to a highprogram voltage during the CLK high period, the selected NVM cells canbe programmed accordingly. If the VDDP is raised to a core voltageduring the CLK high period, the selected NVM cells can be softprogrammed. Soft programming is a capability to allow data being enteredand stored for test and verifying the functionality until satisfaction.Then actually programming can follow afterward. Read can be done byraising a Read Enable (RE) signal to sense and store the contents of allcells in the NVM. Alternatively, RE can be triggered by a Power-On Reset(POR) signal during VDD powering up to a core voltage.

As a method for providing a low-pin-count nonvolatile memory (NVM), yetanother embodiment can, for example, include a test mode detectionmethod. The test mode detection can detect and latch a combination ofvoltage levels and/or timings that should never happen in normalconditions. To prevent any glitches to mis-trigger into the test mode,the unusual conditions need to happen a few consecutive times to go tothe test mode. Once in the test mode, the I/Os of the existingintegrated circuits can be used as I/Os of the embedded NVM. Thisembodiment can work with VDDP/CLK/PGM or VDD/CLK scheme once in the testmode. Reading the contents of the NVM can be activated by a ramping upof a supply voltage, such as VDD, so that no any additional pins areneeded.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will be readily understood by the followingdetailed descriptions in conjunction with the accompanying drawings,wherein like reference numerals designate like structural elements, andin which:

FIG. 1 shows a conventional OTP cell that has one pad for each fuse.

FIG. 2( a) shows a conventional NVM cell that has one NVM element andone MOS as program selector.

FIG. 2( b) shows a conventional NVM cell that has one NVM element andone diode as program selector.

FIG. 2( c) shows a conventional low-pin-count NVM cell that has one NVMelement, one program selector, a sense amplifier, and a latch.

FIG. 3 shows a pin configuration of a low-pin-count OTP memory.

FIG. 4( a) shows a program timing waveform of a serial OTP memory.

FIG. 4( b) shows a read timing waveform of a serial OTP memory.

FIG. 5( a) shows a block diagram of a low-pin-count NVM according to oneembodiment of the present invention.

FIG. 5( b) shows a block diagram of another low-pin-count NVM accordingto another embodiment of the present invention.

FIG. 5( c) shows a block diagram of yet another low-pin-count NVMaccording to another embodiment of the present invention.

FIG. 6( a) shows a low-pin-count NVM protocol according to oneembodiment.

FIG. 6( b) shows a simplified version of low-pin-count NVM protocol forREAD according to one embodiment.

FIG. 6( c) shows a simplified version of low-pin-count NVM protocol forPROGRAM according to one embodiment.

FIG. 6( d) shows a simplified version of low-pin-count NVM protocol forERASE according to one embodiment.

FIG. 7( a) shows a start bit waveform according to one embodiment.

FIG. 7( b) shows a stop bit waveform according to one embodiment.

FIG. 7( c) shows a read timing waveform of a low-pin-count NVM,corresponding to FIG. 5( a), in read mode according to one embodiment.

FIG. 7( d) shows a program timing waveform of a low-pin-count NVM,corresponding to FIG. 5( a), in program mode according to oneembodiment.

FIG. 7( e) shows another program timing waveform of a low-pin-count NVM,corresponding to FIG. 5( a), in program mode according to oneembodiment.

FIG. 8( a) shows a block diagram of a low-pin-count NVM, correspondingto FIG. 5( a), according to one embodiment.

FIG. 8( b) shows a block diagram of a low-pin-count NVM, correspondingto FIG. 5( a), according to another embodiment.

FIG. 8( c) shows a block diagram of a low-pin-count NVM with softprogramming capability according to one embodiment.

FIG. 9( a 1) shows a program timing waveform of another low-pin-countNVM protocol, corresponding to FIG. 5( b), according to one embodiment.

FIG. 9( a 2) shows a soft-program timing waveform of anotherlow-pin-count NVM protocol, corresponding to FIG. 5( b), according toone embodiment.

FIG. 9( a 3) shows a read timing waveform of another low-pin-count NVMprotocol, corresponding to FIG. 5( b), according to one embodiment.

FIG. 9( b 1) shows a portion of block diagram of another low-pin-countNVM macro using low-pin-count protocol shown in FIGS. 5( a), 5(b)according to one embodiment.

FIG. 9( b 2) shows a portion of block diagram of a low-pin-count NVMmacro using low-pin-count protocol shown in FIGS. 5( a), 5(b) accordingto another embodiment.

FIG. 9( b 3) shows a portion of block diagram of a low-pin-count NVMmacro using low-pin-count protocol shown in FIGS. 5( a), 5(b) accordingto yet another embodiment.

FIG. 9( c 1) shows a portion of a schematic of another sense amplifierrelated to low-pin-count NVM macros according to another embodiment.

FIG. 9( c 2) shows a portion of a schematic of another sense amplifierrelated to low-pin-count NVM macros according to another embodiment

FIG. 9( d) shows a portion of a block diagram of cascaded low-pin-countNVM, related to the NVM in FIG. 5( a), according to one embodiment.

FIG. 9( e 1) shows a portion of a block diagram of an OPA with built-intest mode detector to fully utilize the existing I/O pins.

FIG. 9( e 2) shows a portion of a schematic of a test mode detector.

FIG. 9( f 1) shows a portion of a schematic for trimming a resistoraccording to one embodiment.

FIG. 9( f 2) shows a portion of a schematic for trimming a resistoraccording to one embodiment.

FIG. 10( a) shows a soft program procedure for a low-pin-count NVM.corresponding to FIG. 5( a) or 5(b), according to one embodiment.

FIG. 10( b) shows a flow chart of a test mode detection procedure for alow-pin count NVM, according to one embodiment.

FIG. 11( a) shows a flow chart of a program procedure for a low-pincount NVM, corresponding to FIG. 5( a), according to one embodiment.

FIG. 11( b) shows a flow chart of a soft program procedure for a low-pincount NVM, corresponding to FIG. 5( a), according to one embodiment.

FIG. 12 shows a flow chart of a read procedure for a low-pin count NVM,corresponding to FIG. 5( a), according to one embodiment.

FIG. 13( a) shows a flow chart of a program procedure 500 for alow-pin-count NVM according to one embodiment.

FIG. 13( b) shows a flow chart of a soft program procedure 550 for alow-pin-count NVM according to one embodiment.

FIG. 13( c) shows a flow chart of a read procedure 600 for alow-pin-count NVM according to one embodiment.

FIG. 14 shows a processor electronic system that employees at least onelow-pin-count NVM according to one embodiment.

DETAILED DESCRIPTION OF THE INVENTION

The invention relates to a low-pin-count non-volatile memory (NVM)having reduced area and footprint. In one embodiment, the low-pin-countnon-volatile memory can use an interface that makes use of a minimum ofthree pins (i.e. VDDP, CLK, and PGM) external to an integrated circuit.In another embodiment, the low-pin-count non-volatile memory can use aninterface that makes use of a minimum of two pins (i.e. VDDP and CLK)external to an integrated circuit. The interface not only can use only afew external pin but also can share several internal pins with the restof integrated circuit to thereby reduce area and footprint. Moreover, ifdesired, the few external pins can be further multiplexed with the otherpins so that no additional pins are needed. In one embodiment theinterface can pertain to a low-pin-count OTP interface for an OTP memoryso that the OTP memory can be easily integrated into an integratedcircuit.

Simply employing a serial interface is not sufficient for an OTP memorybecause an OTP memory requires high voltage programming control and hasa much longer program time than read time. Also, getting into a programmode at a specific address should be immune to noises and be secure toprevent corrupting data.

Embodiments of a low-pin-count NVM can be embedded an integrated circuitand can be accessed without any additional pins added to the integratedcircuit. The NVM has one or more memory cells and at least one of theNVM cells can have at least one NVM element coupled to at least oneselector and to a first supply voltage line. The selector can be coupledto a second supply voltage line and has a selecting signal. Theintegrated circuit can include at least one test mode detection circuitto activate a test mode upon detecting an abnormal (or out of normal)operation condition(s). Once a test mode is activated, at least one I/Oor supply voltage of the integrated circuit can be used as the I/O orsupply voltage of the NVM to select at least one NVM cell for read,program into nonvolatile, or volatile state. At least one NVM cell canbe read during ramping of at least one supply voltage line. Theactivation of the test mode can be through detecting at least one pinthat has out of range or different polarity in voltage or current,timing violation or transition, inductive or capacitive coupling, thatcan not be found in normal operations.

FIG. 5( a) shows a portion of a block diagram of a low-pin-count NVM 30that use a minimum of three pins, VDDP, PGM, and CLK for high voltage,program/erase control and clock according to one embodiment. NVM 30 hasa NVM memory core 32, and an output buffer 35. By comparing the relativephase between CLK and PGM, start and stop conditions can be detected. Inaddition, device ID, read/program/erase mode, and starting address canbe determined. Thereafter, read, program, or erase sequences can beproperly generated. Program assertion and program time can be determinedby the pulse width of PGM in program mode. Similarly erase assertion anderase time can be determined by the pulse width of PGM in erase mode.Finally, the operations can be ended with a stop condition or runningthrough the whole memory. The data in the NVM memory core 32 can be readto q and then stored in external registers. At the same time, the sameoutput can be sent to the PGM pin for output monitoring by enabling anoutput enable (oe) signal. In some embodiments, this capability can beomitted for data security reasons.

FIG. 5( b) shows a block diagram of a low-pin-count NVM that can use aminimum of two pins, VDDP and CLK, for program control and clock,respectively. The low-pin-count NVM can be reset to an initial stateupon powering up, with a particular NVM cell selected. Any CLK togglescan select next cells. The selected NVM cells can be enabled during theCLK high period. If the VDDP is raised to a program voltage during theCLK high period of the cells, the cells can be programmed into a highresistance state. If the VDDP is raised to a core voltage but not highenough to the program voltage during the CLK high period, the cells canbe soft programmed. Soft program allows data to be stored into the cellsfor test and verification until satisfaction. Then actual programmingcan follow. As for read, a Read Enable (RE) signal can be raised tosense and latch cells in a low-pin-count NVM to output Q in parallel orin serial. The RE can be triggered by a signal external to thelow-pin-count NVM, or triggered by a Power-On Reset (POR) signal. In oneembodiment, the VDDP can be set to ground for sensing during read. Inanother embodiment, the VDDP can be set to a core voltage for sensingduring read. The two external pins, VDDP and CLK, can be furthermultiplexed and shared with other pins in an integrated circuit.

FIG. 5( c) shows a portion of block diagram of a low-pin-count NVM 39embedded into an integrated circuit 36 without any additional pins. Theintegrated circuit 36 has a Device-Under-Trim 37, an OTP macro 39, and aTest Mode Detector 38. The test mode detector 38 detects unusualcombinations of voltage and/or timing among Vi−, Vi+, and VDD to latchinto a test mode. Once in the test mode, Vi−, Vi+, and VDD can be usedas CLK, PGM, and VDDP, as an example. Reading the contents of the NVM 39can be activated by detecting ramping of a supply voltage, such as VDD.

FIG. 6( a) shows a low-pin-count NVM I/O protocol 50 according to oneembodiment. The I/O transaction starts with a start bit 51 and ends witha stop bit 55. After detecting the start bit 51, there is a fixed 8-bitdevice ID code 52 to specify device names and types to access, such asSRAM, ROM, OTP or device 1, device 2, etc. In one embodiment, a devicecan grant access only when the requested device ID matches the targetdevice ID. Then, there is multiple-bit access pattern 53 to specifyread, program, or erase. It is very important for an NVM to preventaccidental programming or erasing so that programming or erasing canhappen only when detecting special data patterns. The special accesspattern to unlock programming can be a log sequence of alternative zerosand ones such as 0101,0101,0101,0101 for read, 1010,1010,1010,1010 forprogram, and 0101,0101,1010,1010 for erase. The next field is a startingaddress 54. Sixteen bits in the address 54 allows memory capacity up to64K bits. This field can be extended by itself when detecting aparticular device in field 52 that has capacity higher than 64 Kb orusing more bits in the address 54. After knowing the device type,read/program/erase operation, and starting address in fields 52, 53, and54, respectively, the next step is the actual read, program, or erasecycles. The data access ends when detecting a stop bit 55, or runningthrough the whole memory. The R/P/E access patterns 53 as noted aboveare exemplary. The numbers of bits for Device ID 52, R/P/E accesspattern 53, and address field 54 can vary. Some bit fields can beomitted in other embodiments. The order of bit fields can beinterchangeable. It will be apparent to those skilled in the art thatvarious modifications and variations can be made.

If the capacity of the NVM is very low, such as 32 bits or 256 bits, aconventionally rather long LPC detection sequence may defeat the purposeof a simple and reliable I/O protocol. Hence, according to one aspect ofembodiment of the invention, a simplified I/O protocol can be providedwhich has a substantially reduced LPC detection sequence.

FIGS. 6( b), 6(c), and 6(d) show simplified versions of low-pin-countNVM protocols for read, program, and erase, respectively, according toone embodiment. FIG. 6( b) shows a low-pin-count read protocol 60 with astart bit 61, LPC detection field 62, LPC Read access 63, and stop bit64. Similarly, FIG. 6( c) shows a low-pin-count program protocol 65 witha start bit 66, LPC detection field 67, LPC program access 68, and stopbit 69. FIG. 6( d) shows a low-pin-count erase protocol 75 with a startbit 76, LPC detection field 77, LPC erase access 78, and stop bit 79. Asimple read, program, or erase sequence, such as 0101,0101, 1010,1010,or 1010,0101 respectively, can grant read, program or erase access in alow capacity NVM. The pattern bits to specify operations can be aminimum of only one or two bits in other embodiments. The device ID andstarting address fields can be omitted. The address can start with thelowest possible address and increments by one after each access. Thoseskilled in the art understand that the above descriptions are forillustrative purpose. The numbers of fields, number of bits in eachfield, the order of the fields, address increment/decrement, and actualR/P/E patterns bits may vary and that are still within the scope of thisinvention.

FIGS. 7( a) and 7(b) show one embodiment of start and stop bitwaveforms. When the I/O transaction is inactive, the control signal PGMalways toggles at the low CLK period. If the PGM toggles at the high CLKperiod, this indicates a start or stop condition. When PGM goes highduring the high CLK period, this shows a start condition. When PGM goeslow during the high CLK period, this shows a stop condition. By usingthe relative phase between the PGM and the CLK, a chip select functioncan be provided and a chip select CS# pin can be saved.

FIG. 7( c) shows a read timing waveform of a low-pin-count NVM in readmode, corresponding to FIG. 5( a), according to one embodiment. Once aread transaction is detected, the data in the NVM can be read out onebit at a time at each falling CLK edge from the starting address. Thestarting address can be specified in the address field or can be impliedas being the lowest or highest possible address. The address can beauto-incremented or decremented by one after each access. In abi-direction I/O, PGM/Q pin is left floating externally after going intothe LPC read stage so that the same pin can be used for outputting data.

FIG. 7( d) shows a program timing waveform of a low-pin-count NVM in aprogram mode, corresponding to FIG. 5( a), according to one embodiment.Once a program condition is detected, the I/O transaction goes into theactual programming cycles from the starting address. In one embodiment,the address increments at each falling edge of CLK. Programming a bit isdetermined if the PGM is high at the rising edge of each CLK cycle. Forexample, the PGM is high at the CLK rising edge of bit 0, 1, 2, and 3 sothat bit 0, 1, 2, and 3 are programmed during the CLK high period. SincePGM is low at the CLK rising edge of bit 4, bit 4 is not programmed. Bydoing this way, each CLK toggling increments the bit address by one andthe PGM high or low at each CLK rising edge determines that bit beingprogramming or not. Actual programming time is the CLK high period.

FIG. 7( e) shows a program timing waveform of a low-pin-count NVM in aprogram mode, corresponding to FIG. 5( a), according to anotherembodiment. Once the program condition is detected, the I/O transactiongoes into the actual programming cycles from the starting address. Theprogram address increments after each low-to-high transition of PGM. Theactual program timing depends on the number of whole CLK cycles withineach PGM high pulse. For example, in bit 0 the PGM pulse width is largerthan 3 CLK cycles but smaller than 4 CLK cycles to enable actualprogramming for 3 CLK cycles. In bit 1, the PGM pulse width is less thanone CLK period so that bit 1 is not programmed. In bit 2, the PGM pulsewidth is larger than one CLK period but smaller than two so that bit 2is programmed for 1 CLK cycle. By doing this way, the CLK frequency canbe the same for both read and program, while the program period can bedetermined by the number of CLK high periods in each PGM high pulsewidth. The actual program pulses can be delayed by one CLK period tomake determining the number of CLK cycles easier. The embodiments inFIGS. 7( d) and 7(e) can be applied to erase mode too. In some NVMs, anerase operation happens on a page basis. In that case, the erase addresscan represent a page address, instead of a bit address.

FIG. 8( a) shows a block diagram of a schematic of a low-pin-count NVM80 according to one embodiment. A start bit detection block 81 detectsif a starting condition is met by the relative phase between PGM and CLKas shown in FIGS. 7( a) and 7(b). If yes, a LPC Dev-RPE detection block82 detects if a device ID and read/program/erase access pattern are met,and then obtains a starting address. With a valid read, program, orerase status and the starting address, a LPC access block 83 performsactual read, program, and erase cycles. If the I/O transaction is aread, a tri-state buffer 84 is asserted so that the output Q isre-directed into the same PGM pin (which can serve as a shared PGM/Qpin). For some embodiments, external read is not desirable for datasecurity reasons such that the tri-state buffer 84 can be omitted.

FIG. 8( b) shows a block diagram of a schematic of a low-pin-count NVM90 according to one embodiment. A start bit detection block 91 detectsif a starting condition is met by the relative phase between PGM and CLKas shown in FIGS. 7( a) and 7(b). If yes, a LPC Dev-RPE detection block92 further detects if a device ID and program, or erase access patternare met, and then obtains a starting address. With a valid program, orerase status and the starting address, a LPC access block 93 performsactual program and erase cycles. Granting read access can be made simpleby asserting a level or a pulse signal to “r” in another embodiment,since read is not a destructive operation. If the I/O transaction is aread, the tri-state buffer 94 is asserted so that the output Q isre-directed into the same PGM pin (which can serve as a shared PGM/Qpin). For some embodiments, external read is not desirable for datasecurity reasons such that the tri-state buffer 94 can be omitted.

Soft programming is a technique to allow storing data into registers fortest before actual programming could happen. Soft programming isespecially important for OTP because the OTP cells can only beprogrammed once. FIG. 8( c) shows a block diagram of a schematic of alow-pin-count NVM 90′ with soft program scheme according to oneembodiment. A start bit detection block 91′ detects if a startingcondition is met by the relative phase between PGM and CLK as shown inFIGS. 7( a) and 7(b). If yes, a LPC Dev-RPE detection block 92′ furtherdetects if a device ID and program/erase access pattern are met, andthen obtains a starting address. With a valid program, or erase statusand a starting address, a LPC access block 93′ performs the actualprogram and erase cycles. A soft programming capability can be providedby adding a multiplex 94′ at the output of the LPC access circuit 93′ tobypass the LPC RPE detection block 92′ and the LPC access circuit 93′.The data to be tested for programming can be provided from PGM to themultiplex 94′ directly upon asserting an LVDDP signal. Alternatively,the LVDDP can be asserted once the VDDP voltage is detected lower than aprogram voltage. The start bit, device ID, or pattern bits forread/program/erase can be bypassed to save time. In other embodiment, asoft program mode can be activated when detecting a special mode in theR/P/E mode bits to accept data from PGM and route them to the output ofLPC access circuit 93′ Q′ without using the multiplexer 94′. In yetanother embodiment, the output registers can be built into the OTP.There are many variations and equivalent embodiments to perform softprogramming and they are all within the scope of this invention. It isdesirable to keep the VDDP below the program voltage to preventaccidental programming during soft programming.

FIGS. 9( a 1), 9(a 2), and 9(a 3) show timing waveforms of alow-pin-count NVM protocol that needs only two pins (i.e. CLK and VDDP)as shown in FIG. 5( b) for at least program, soft program, and readaccording to another embodiment. This protocol uses CLK to select and toenable the NVM cells sequentially and then relies on raising the VDDP toa high program voltage or not to determine programming into these cells.If the VDDP is at a high voltage (i.e. 5V for programming a fuse), theselected and enabled cells can be programmed. If the VDDP is at a corevoltage (i.e. 1.8V for 0.18 um, or 1.2V for 0.13 um CMOS, etc.), theselected and enabled cells can not be programmed. But, instead, the datacan be stored in the NVM cells with data being 0 or 1, depending onwhether VDDP is at ground or core voltage. This is one embodiment forsoft program. As for read, the resistance states of the NVM cells can besensed and stored when the VDD is detected ramping up from ground to thecore voltage. VDDP can be set to ground or VDD during read in oneembodiment.

FIG. 9( a 1) shows a timing waveform of programming NVM cells from 0 to11 as an example. The VDD is set at a core voltage. CLK is togglingbetween ground and core voltage periodically to select and enable theNVM cells from 0, 1, 2, etc. VDDP can be raised to a high voltage (i.e.5V for programming a fuse) to program those cells selected and enabledby CLK. For example, if cells 0, 1, 2, and 3 need to be programmed into1, the VDDP can be set at a high voltage during the high CLK periodsselecting those cells. Since cell 4 is not intended to be programmed,VDDP is set low at ground voltage when CLK is high at cell 4. Cells canbe programmed only when both CLK and VDDP are at core and high voltage,respectively.

FIG. 9( a 2) shows a timing waveform of soft programming cells from 0 to11 as an example. The VDD is set at a core voltage. CLK is togglingbetween ground and core voltage periodically to select and enable cellsfrom 0, 1, 2, etc. VDDP can toggle between a core voltage (i.e. 1.2V for0.13 um CMOS) and ground to soft program those bits into 1 or 0 enabledby CLK. For example, if cells 0, 1, 2, and 3 need to be soft programmedinto 1, the VDDP can be set at a core voltage during the high CLKperiods of those cells. Since cell 4 is not intended to be softprogrammed so that VDDP is set low at ground voltage when CLK is high atcell 4. In one embodiment, a detection circuit can detect if VDDP is setat the core voltage to enable sense amplifiers to sense the cells andstore the data accordingly.

FIG. 9( a 3) shows a timing waveform of reading cells in a low-pin-countNVM, according to one embodiment. When VDD is ramping up from ground toa core voltage, a Power-On Reset (POR) signal can be generated. This PORcan be used to generate another pulse RE to enable at least one senseamplifier and to store sensed data. The POR or RE signal can activate asingle or a plurality of sense amplifiers to sense a single or aplurality of cells in one embodiment. In another embodiment, more thanone RE signals can be generated sequentially to sense more cells intothe latches until all desirable cells are read. In another embodiment,the POR pulse can be used as RE.

FIG. 9( b 1) shows a portion of a block diagram 140 of a low-pin-countNVM macro using a two-pin protocol as shown in FIG. 9( a 1)-9(a 2),according to one embodiment. The macro 140 has an NVM core 149 and aPower-On Reset (POR) circuit 145. The macro 149 has N NVM cells, 141-0through 141-(N−1), which can be the cell 130 as shown in FIG. 2( c).This macro 149 also has at least one counter 142, a plurality ofdecoders 143, and level shifters 144. The counter 142 can be reset toall Os by a power-on reset (POR) signal and then be incremented upondetecting one CLK toggle. The counter 142 may output a flag Cv toindicate an overflow. The counter outputs are decoded using a pluralityof decoders 143 and further level shifted to VDDP voltage in levelshifters 144. The outputs from the level shifters 144 can be used toselect the cells from 141-0 to 141-(N−1) for programming. The levelshifters 144 can be powered by VDDP when a high voltage at VDDP isdetected, or VDD when a core voltage at VDDP is detected for program orread. The sense amplifiers in the cells 141-0 through 141-(N−1) can beactivated by a Read Enable (RE) signal generated from a POR block 145.

FIG. 9( b 2) shows a portion of a block diagram 160 of a low-pin-countNVM macro using a two-pin protocol as shown in FIG. 9( a 1)-9(a 2),according to another embodiment. The macro 160 has an NVM core 160′ anda Power-On Reset (POR) circuit 165. This macro 160′ has N NVM cells,169-0 through 169-(N−1), which can be similar to the cell 130 as shownin FIG. 2( c) with input/output multiplexers, 166-i and 168-i, wherei=0, 1, 2, . . . , N−1, respectively, to a shared sense amplifier 167.Each NVM cell 169-i has a programmable resistive element 161-i coupledto a selector 165-i, where i=0, 1, . . . , N−1. This macro 160 also hasat least one counter 162, a plurality of decoders 163, and levelshifters 164. The counter 162 can be reset to all Os by a power-on reset(POR) signal and be incremented upon detecting one CLK toggle. Thecounter 162 may output a flag Cv to indicate an overflow. The counteroutputs are decoded using a plurality of decoders 163 and further levelshifted to VDDP voltage in level shifters 164. The outputs from thelevel shifters 164 can be used to select the cells from 169-0 to169-(N−1) for programming. The level shifters 164 can be powered by VDDPwhen a high voltage at VDDP is detected, or VDD when a core voltage atVDDP is detected for program and read, respectively. The node in an NVMcell between the NVM element and the selector can be enabled by CMOSpass gates 166-0 through 166-(N−1) to a shared sense amplifier 167 forsensing. The output of the sense amplifier 167 can be further selectedby another set of CMOS pass gates 168-0 through 168-(N−1) to outputnodes Q0 through Q_(N-1). The pass gates 166-i and 168-i, where i=0, 1,2, N−1, can be controlled by the outputs of the decoder 163 at corevoltage level. The sense amplifier 167 can be enabled by a Read Enable(RE) from a Power-On Reset block 165. There can be one sense amplifier167 for all or a portion of NVM cells in other embodiments. Similarly,the sense amplifier 167 can be turned on one or multiple times until allavailable cells can be sensed in yet another embodiment.

FIG. 9( b 3) shows a portion of a block diagram of a low-pin-count NVM150 according to yet another embodiment. The low-pin-count NVM 150 has aplurality of NVM cell 159-0, 159-1, etc. The NVM cell 159-0 has an NVM151, a selector 152, a sense amplifier 153, a master latch 154 and aslave latch 155. The master and slave latches of 154 and 155 constitutea shift register to the next NVM cell 159-1. When the NVM 150 is poweredup to an initial state, the latches 154 and 155 are set to 1 to selectthe selector 152 in NVM cell 159-0, while the other latches in the otherNVM cells are set to Os. When the CLK toggles, the “1” in the latches154 and 155 are shifted to the latches in the NVM cell 159-1 to selectthe 159-1 cell. The cells selected and enabled by CLK allow each VDDPpulse being programmed or soft programmed into the cells. Read can beactivated by raising a RE signal to enable the sense amplifier 153 to anoutput Q0, Q1, . . . etc. There are many variations and equivalentembodiment of the low-pin-count NVMs and they are all within the scopeof this invention.

FIGS. 9( c 1), 9(c 2), and 9(c 3) only show three of many possibleembodiments of a low-pin-count NVM macro, The number of the NVM cellscan vary. The NVM cells can be organized in one or two dimensional arrayelectrically or physically. The numbers of row or column may vary in oneor two dimensional array. The selector in an NVM cell can be a MOS,diode, or bipolar device. There can be a single or a plurality of senseamplifiers to sense a single or a plurality of cells simultaneously. Thesense amplifiers can be activated more than once to sense more bits by aPOR signal or by a signal generated from internal or external of thelow-pin-count NVM. The actual programming time can be during the CLK lowperiods rather than the high periods. There are many variations andequivalent embodiments for the low-pin-count NVM protocol and they areall within the scope of this invention for those skilled in the art.

FIG. 9( c 1) shows a portion of a sense amplifier schematic 180 for alow-pin-count NVM macro according to one embodiment. Vx is a nodebetween the NVM element and the selector that can be provided as aninput to a sense amplifier. For the CLK/VDDP two-pin protocol, the VDDPis tied to ground for an NVM cell as shown in FIG. 2( c) and a pullup(not shown in FIG. 9( c 1)) is applied to Vx as an input to the senseamplifier 180 during sensing. Similarly, a Vref from a reference cellprovides a reference input to the sense amplifier 180. The senseamplifier 180 has a sensing branch that has a PMOS 181 with the sourcecoupled to VDD. The drain of PMOS 181 is coupled to the drain of anotherNMOS 183. The source of NMOS 183 is coupled to the drain of another NMOS184 whose source is coupled to a drain of a common NMOS 185. The gate ofthe NMOS 183 is coupled to Vx. A reference branch has a PMOS 181′ whosesource is coupled to VDD and whose drain is coupled to a drain of anNMOS 183′. The source of NMOS 183′ is coupled to the drain of an NMOS189′ and whose source is coupled to a drain of a common NMOS 185. Thegate of the NMOS 183′ is coupled to Vref. The gates of MOS 181 and 184is coupled together and further coupled to the drain of the PMOS 181′,Vp. Similarly, the gates of MOS 181′ and 184′ are coupled together andfurther coupled to the drain of the PMOS 181, Vn. There are twoinverters 189 and 189′ whose inputs are coupled to Vn and Vp,respectively, and whose outputs are Vout+ and Vout− respectively, theoutputs of the sense amplifier 180. There are two pull-ups 188 and 188′whose sources are coupled to VDD and whose drains are coupled to Vp andVn, respectively. The gates of pull-ups 188, 188′, and the common NMOS185 are coupled to an activation signal 4. When Vx and Vref hassufficient differential voltage (e.g. 100 mV) developed, the senseamplifier 180 can be activated by pulling the signal φ to VDD. There canbe a pair of cross-coupled NAND gates coupled to the outputs Vout+ andVout− to latch the sensed data so that φ can be returned to ground aftersensing. The sense amplifier shown in FIG. 9( c 1) is an example toillustrate the sensing concept only. There are many variations andequivalent embodiments of latch-type sense amplifiers that can beapplied to any NVM cells in a low-pin-count NVM.

FIG. 9( c 2) shows a portion of a sense amplifier schematic 170 for alow-pin count NVM, according to another embodiment. This sense amplifier170 has a bias branch that has a PMOS 171 whose source is coupled to VDDand whose gate and drain are coupled together and further coupled to abias resistance Rbias 172. The other end of Rbias is coupled to ground.There is a reference branch that has a PMOS 175 whose source is coupledto VDD, whose gate coupled to the gate of PMOS 171, and whose draincoupled to a reference resistance Rref 176. The other end of Rref iscoupled to ground. Similarly, there is a sensing branch that has a PMOS177 whose source is coupled to VDD, whose gate is coupled to the gatesof PMOS 171 and 175, and whose drain is coupled to the Vx of a NVM cellas shown in FIG. 9( c 2). The other end of the NVM element VDDP iscoupled to VDDP, which can be set to ground for sensing. PMOS 179 andNMOS 179′ constitute a second stage of the sense amplifier 170. Thesource of 179 is coupled to VDD, the gate is coupled to Vx, and thedrain is coupled to the drain of NMOS 179′. The gate of 179′ is coupledto a current mirror of the bias branch. The current mirror branch has aPMOS 173 and an NMOS 174. The source of the PMOS 173 is coupled to VDD,the gate coupled to the gate of PMOS 171, and the drain coupled to thedrain of the NMOS 174. The gate of the NMOS 174 is coupled to the drainof the same device and to the gate of 179′. The source of the NMOS 174is coupled to ground. In this static sense amplifier embodiment, theVDDP of the NVM cell is coupled to ground for sensing. The senseamplifier 170 shown in FIG. 9( c 2) is for example only. There are manyvariations and equivalent embodiments of sense amplifier that can beapplied to any NVM cells in a low-pin-count NVM.

The low-pin-count NVM can be cascaded. FIG. 9( d) shows a portion of aschematic 190 that has two instances of a low-pin-count NVM cascaded as191-0 and 191-1. The low-pin-count NVM 191-0 has an LPC NVM Core 192-0(e.g. 149 in FIG. 9( b 1) or 160′ in FIG. 9( b 2)), a read pulsegenerator 193-0, a clock output buffer 194-0, and a clock input buffer195-0. The POR is not included in the LPC NVM 192-0. The output clockbuffer 194-0 generates a clock output to the next instance when thecounter inside the LPC NVM core 192-0 overflows with a flag cv. And theclock input buffer 195-0 is disabled by cv to prevent accepting furtherclock signal to the instance 191-0. By do this way, the clock from CLKican be passed to the next instance. Upon receiving an Read Enable input(REi), the Rea Pulse Generator 193-0 generates two read pulses rd0 andrd1, as an example, to read the contents of the LPC NVM. After the firstinstance 191-0 is read, a REo can be generated as an input to the REi ofthe next stance 191-1 after delaying two pulses re0 and re1. By doingthis way, the contents of the LPC NVM can be read sequentially from thefirst, second, and third instances, etc. In one embodiment, a PORcircuit can be input to REi of the Read Pulse Generator 193-0 to readthe contents of the low-pin-count NVMs sequentially upon powering up. Inanother embodiment, all contents in the low-pin-count NVMs can be readupon powering up. There are many variations and equivalent embodimentsfor cascading LPC NVMs and they all within the scope of this invention.

In some applications, absolutely no additional pins can be provided fora low-pin count NVM embedded in an integrated circuit for devicetrimming. FIG. 9( e 1) shows an integrated circuit 246 that has anOperation Amplifier (OPA) 247, which has only 5 pins: Vi−, Vi+, Vo, VDD,and VSS. However, an OPA needs to be trimmed for input DC offset, gain,transconductance, frequency compensation, and slew rate, etc. withoutany additional pins in a 5-pin package. As such, in one embodiment, forexample, by detecting a single or combination of unusual conditions ofvoltages, currents, or timings, a test mode can be entered so that atleast a portion of the I/Os of the OPA 247 can be used for I/Os of theNVM 249. For example, Vi−, Vi+, VDD, and VSS of the OPA 247 can be usedas CLK, PGM, VDDP, and VSS of the NVM 249, respectively. The output ofthe OPA 247 Vo can also be used as an output of the NVM 249. A test modedetector 248 can be designed to perform this detection function eitheras a stand alone block or built into the NVM 249.

FIG. 9( e 2) shows a portion of a schematic of a test mode detector 240,corresponding to Test Mode Detector 248 in FIG. 9( e 1), according toone embodiment. Assuming the normal operation range of the OPA isbetween 0 to 5V and the absolute maximum voltage of any pin is 7.0V, anypin that is higher than 5V, 6.5V for example, is considered an unusual(or abnormal) condition. To prevent any glitches to mis-trigger into thetest mode, this unusual condition can be detected a few consecutivetimes to ensure going into test mode deliberately. The test modedetector 240 has three D flip-flops 241 through 243, an inverter 244,and a 3-input AND 245 and an OR 245′. The inverter 244 has a supplyvoltage from Vi- and an input from VDD. If the VDD=5V but Vi−=6.5V, theinverter output is high in a very unusual condition, because VDD voltagetends to be higher than any input pins. Subsequently, this input can besampled by Vi+ for three times and then latched in the flip-flops241-243 through gates AND 245 and OR 245′. Sampling by Vi+ three timesconsecutively can prevent any glitches to mis-fire into the test mode.Once the three flip-flops 241-243 latch all 1s, the data in theflip-flops will be latched all 1s even if the input of the inverter 244changes, embodied by the Boolean logic AND 245 and OR 245′. The unusualconditions can be sampled any number or not latched at all in oneembodiment. The flip-flops can be reset during VDD ramping up in anotherembodiment.

Any out of ranges or polarity of voltage and/or current that should notbe found in normal operations can be used as unusual conditions totrigger into a test mode. Any timing transitions, with or withoutcertain pre-determined patterns, that can not be found in normaloperations can be used as unusual conditions. Any duration of transientsthat can not be found in normal operations can be used as unusualconditions. Any inductive or capacitive coupling that should not befound in normal operations can be used as unusual conditions. Any modesthat deviate from normal operations, such as idle, sleep, hibernation,shutdown, protection, or unused product test modes, can be used asunusual conditions. Any abnormal temperature and/or temperature changescan be used as unusual conditions. Return to normal mode can betriggered by similar procedures with the opposite conditions as gettinginto the test mode or after a time duration. There are many variationsand equivalent of unusual conditions and detection and theircombinations that can be used to go into a test mode and that are allwithin the scope of this invention for those skilled in the art.

FIG. 9( f 1) shows a portion of a schematic 250 for trimming a pair ofresistor networks for matching according to one embodiment. A pair ofresistor networks 251 and 252 are associated with two inputs Vi− and Vi+of the OPA 247 in FIG. 9( e 1), respectively. The resistor network 251in Vi− side has a main resistor r 255 and three large resistors 254_0,254_1, and 254_2 associated with three switches 253_0, 253_1, and 253_2,respectively. The resistor network 252 in Vi+ side has similarcomponents. The resistances of resistors 254_0, 254_1, and 254_2 are 4R,2R, and R, respectively, while R is very larger than r. The switches253_0, 253_1, and 253_2 can be open or close to adjust the equivalentresistance in the Vi− side. Opening and closing a switch can be assignedas value 1 and 0, respectively. Since the resistances of the resistors254_0, 254_1, and 254_2 are binary weighted and R>>r, opening or closingthe switches 253_0, 253_1, and 253_2 can increase or decrease the mainresistor r 255 slightly in binary fashion according to the switchvalues. The switch values can be assigned from outputs of an OTP. Toprovide 2^(N) steps for trimming, the total number of trimming resistorsand switches are N for one side, or 2N OTP bits total for two sides.

FIG. 9( f 2) shows a portion of a schematic 260 for trimming a pair ofresistor networks for matching according to another embodiment. A pairof resistor networks 261 and 262 are associated with two inputs Vi− andVi+ of the OPA 247 in FIG. 9( e 1), respectively. The resistor network261 in Vi− side has a main resistor r 265 and three large resistors264_0, 264_1, and 264_2 associated with three switches 263_0, 263_1, and263_2, respectively. The resistor network 262 in Vi+ side has similarcomponents. The resistances of resistors 264_0, 264_1, and 264_2 are 4R,2R, and R, respectively, while R is very larger than r. The switches263_0, 263_1, and 263_2 can be open or close to adjust the equivalentresistance in the Vi− side. Opening and closing a switch can be assignedas value 1 and 0, respectively, and all switches are assumed closeinitially. Since the resistances of the resistors 264_0, 264_1, and264_2 are binary weighted and R>>r, opening or closing the switches263_0, 263_1, and 263_2 can increase or decrease the main resistor r 265slightly in binary fashion according to the switch values. Since theabsolute values of the resistor networks 261 or 262 does not matter butonly the match between the networks 261 and 262, only one side of theswitches needs to be selectively open from an initial state. In otherwords, if the switch values come from outputs of an OTP, only one set ofthe resistor network 261 or 262 needs to be assigned with OTP outputs totrim (i.e. Q2-Q0 coupled to the switches in network 261 or 262), whilethe switches in the other set can be in the initially state (i.e. all Osor all 1s). Therefore, only one additional OTP output Q3 is needed tospecify which side of network to trim. To provide 2^(N) steps fortrimming, the total OTP bits are N for both sides plus one for sideselection, or N+1 bits total, though the total number of switches isstill 2N. In general, the number of OTP bits required for M steptrimming is an integer not smaller than log₂(M)+1.

FIGS. 9( f 1) and 9(f 2) only show two examples to illustrate the devicenetworks for trimming. The devices to be trimmed can be any devices,such as resistors, capacitors, inductors, transistors, diodes, bipolartransistors, or MOS devices. The number of devices and switches can beany numbers in a trimming network. The switches can be any switchingdevices, such as diode, bipolar, or MOS. The device values can be thesame for equal-step trimming, binary weighted for binary-step trimming,or any values for any kinds of combinations. The device network to betrimmed can be further added on with devices in serial and/or inparallel to provide additional scaling and/or offset. The devices addedon can be the same kind or different kinds of devices as those devicesin the network. The device network can be trimmed to meetspecifications, instead of matching with the other set of devicenetwork. The devices can also be trimmed in analog means, for example,the resistance can be programmed with resistance increased progressivelyby applying a single or a plurality of pulses until a desirable value isachieved. In the embodiment as shown in FIG. 9( f 1), the other sidethat does not need to be trimmed can be further used for trimming in asecond pass. For example, one set can be used for trimming in the waferlevel and the other set can be used for trimming after package inanother embodiment. The device network can be set to certain values inwafer level by soft programming so that other tests can continue, andthen the actual programming can be done after package.

The NVM for trimming as shown in FIGS. 9( e 1) and 9(e 2) are only forillustrative purposes. Particularly, the NVM can be One-TimeProgrammable (OTP) device that can only be programmed once. The OTP canbe at least an electrical fuse, anti-fuse, or floating-gate device. Theintegrated circuit to be trimmed can be Operational Amplifier (OP Amp),voltage regulator, current regulator, DC-DC or DC-AC converter, quartzcrystal, any power management integrated circuits, or any SoCs. Theintegrated circuit to be trimmed can have no more than 2 pins, includingpower supply, program supply, input, output, and/or ground. Trimming canstill be achieved by using unusual conditions to get into a test modeand then using the existing pins of the integrated circuit to access NVMfor program, soft program, or read. In terms of integrated circuits tobe trimmed, trimming networks, unusual conditions, or methods of gettinginto or out of the unusual conditions, there are many variations andequivalent embodiments for this invention and they are all within thescope of this invention according to those skilled in the art.

In most applications, the NVM data are for device trimming,configuration or parameters storage, memory repair, or MCU code.Normally, data are loaded into registers to test if they can functionproperly before actually programming. This technique is called softprogram. FIG. 10( a) shows a flow chart of a soft-program procedure 200for a low-pin-count NVM. The procedure 200 starts with preparing thedata to be programmed into an NVM in step 205, and then loading theintended NVM data to be programmed into the output registers of the NVMin 210. The registers are tested to check if they can function asexpected at 220. If not, go back to step 205 to adjust the data fortesting. If yes, proceed to test check if all NVM bits have been used instep 225. If yes, start programming the contents into the NVM at 230 andstop after finishing in step 240. Otherwise, proceed to prepare a fewmore bits of NVM data for programming in step 205. Soft programming isespecially useful for OTP memories because such devices can only beprogrammed once.

FIG. 10( b) shows a flow chart of a test mode detection procedure 200′for a low-pin-count NVM. The procedure 200′ starts with finding unusual(or abnormal) conditions in an integrated circuit with an embedded NVMin step 205′. The unusual conditions can be any combinations of voltagelevel and/or timings that should not happen in normal operations. Thenlatch the unusual condition in step 210′ and record the occurrence ofunusual condition i in step 220′. Check if the occurrence of the unusualcondition equal to a preset number N in step 225′. If not, go back tostep 220′ to record more occurrences. If yes, proceed to go into a testmode so that a portion or all of the I/Os in the integrated circuit canbe used as the I/Os of the embedded NVM. This test mode embodiment isespecially useful for OTP memories and/or with low pin counts becausesuch devices can only be programmed once for trimming device mismatches.

FIG. 11( a) shows a flow chart of a program procedure 230 for alow-pin-count NVM, corresponding to FIGS. 6( a) through 8(c), accordingto one embodiment. The procedure 230 starts with detecting a start bitat 231. If a start bit is detected, proceed to detect a valid device IDat 232, or ends at 299 with errors if not detected. Then, the procedure230 proceeds to detect a program pattern at 233, or ends at 299 witherrors if not detected. The procedure 230 continues to obtain a startingaddress in 234. After the start bit, device ID, program pattern, andstarting address are checked and obtained, the next step would be toprovide an adequate program waveform based on the data for thecorresponding address at 235 and auto increment the address afterward.The programming progresses until a stop bit is detected in 236 or theavailable bits in an NVM are exhausted. Then the procedure 230 finishesat 237. The above discussion is for illustrative purposes. For thoseskilled in the art understand that some steps can be omitted, some stepscan be in different order, the number of bits in each bit field can bedifferent, the bit field order can be interchangeable and that are stillwithin the scope of this invention.

FIG. 11( b) shows a flow chart of an erase procedure 330 for alow-pin-count NVM, corresponding to FIGS. 6( a) through 8(c) accordingto one embodiment. The procedure 330 starts with detecting a start bitat 331. If a start bit is detected, proceed to detect a valid device IDat 332, or ends at 399 with errors if not detected. Then, the procedure330 proceeds to detect an erase pattern at 333, or ends at 399 witherrors if not detected. The procedure 330 continues to obtain a startingaddress at 334. After the start bit, device ID, erase pattern, andstarting address are checked and obtained, the next step would be toprovide an adequate erase waveform based on the data for thecorresponding address at 335 and auto increment the address afterward.The erasing progresses until a stop bit is detected at 336 or theavailable bits in a low-pin-count NVM are exhausted, then the procedure330 finishes at 337. The above discussion is for illustrative purposes.For those skilled in the art understand that some steps can be omitted,some steps can be in different order, the number of bits in each bitfield can be different, the bit field order can be interchangeable andthat are still within the scope of this invention.

FIG. 12 shows a flow chart of a read procedure 400 for a low-pin-countNVM, corresponding to FIGS. 6( a) through 8(c), according to oneembodiment. The procedure 400 starts with detecting a start bit at 410.If a start bit is detected, proceed to detect a device ID at 420, orends with errors at 499 if not detected. Then, proceeds to detect a readpattern at 430, or ends with errors at 499 if not detected. Theprocedure 430 continues obtaining a starting address at 440. After thestart bit, device ID, read pattern, and starting address are checked andobtained, the next step is to read data bit by bit at the rising orfalling edge of each clock cycle at 460 and auto increment the addressafter each access. The read progresses until a stop bit is detected orthe available NVM bits are exhausted at 470, then the procedure 400finishes with an end at 480. The above discussion is for illustrativepurposes. For those skilled in the art understand that some steps can beomitted, some steps can be in different order, the number of bits ineach bit field can be different, the bit field order can beinterchangeable and that are still within the scope of this invention.

The block diagrams shown in FIGS. 8( a), 8(b), and 8(c) are forillustrative purpose. The actual circuit and logic implementations mayvary. Similarly, the procedures described in FIGS. 10, 11(a), 11(b), and12 are for exemplifying purposes. The detailed implementation in theprocedures may vary. For example, some steps may be skipped ifsimplified versions of read, program, or erase protocols in FIG. 6( b),6(c), or 6(d) are employed. There can be many embodiments of thecircuit, logic, block diagram, and procedures and that are still withinthe scope of this invention for those skilled in the art.

FIG. 13( a) shows a flow chart of a program procedure 500 for alow-pin-count NVM, corresponding to CLK/VDDP protocol as shown in FIGS.9( a 1), 9(a 2), and 9(a 3), according to one embodiment. The programprocedure starts at 502 by preparing a high voltage HV for VDDP pin.Then, determine the maximum number of bits M to be programmed in anN-bit NVM in step 504. Check if M is larger than N in step 506. If yes,the programming stops at 529 with an error. If no, proceedingprogramming in step 510 by setting the index i equal to 1 and thenprepare to generate CLK for M cycles. Check if the i-th address needs tobe programmed in step 512. If yes, raise VDDP to HV for a specific timeT during the i-th CLK high period and then proceed to 516. If no,proceed to 516. At step 516, check if i is less than M. If no, theprocedure finishes and ends at 540. If yes, increment the index i in 518and go back to step 512 to check and program the following bits.

FIG. 13( b) shows a flow chart of a soft program procedure 550 for alow-pin-count NVM, corresponding to CLK/VDDP protocol as shown in FIGS.9( a 1), 9(a 2), and 9(a 3), according to one embodiment. The softprogram procedure starts at 552 by preparing a core voltage VC for VDDPpin. Then, determine the maximum number of bits M to be soft programmedin an N-bit NVM in step 554. Check if M is larger than N in step 556. Ifyes, the soft programming stops at 579 with an error. If no, proceedingsoft programming in step 560 by setting the index i equal to 1 and thenprepare to generate CLK for M cycles. Enable sense amplifier in step562. Sense the i-th data being 0 or 1 if the VDDP voltage is at groundor VC, respectively, and store data into a latch at 564. Check if i isless than M in 566. If no, the procedure finishes and ends at 590. Ifyes, increment the index i in 568 and go to step 564 to soft program thefollowing bits. In another embodiment, the step 562 can be omitted andthe data to be programmed are sent to an output latch in step 564.

FIG. 13( c) shows a flow chart of a read procedure 600 for alow-pin-count NVM, corresponding to CLK/VDDP protocol as shown in FIGS.9( a 1), 9(a 2), and 9(a 3), according to one embodiment. The readprocedure starts at 602 by ramping up VDD from ground to a core voltageVC. Then, generate a power-up reset (POR) signal in step 604. PORgenerates a first read pulse RE in step 606. The RE signal enables asingle or a plurality of sense amplifier to read S bits into theircorresponding latches at 608. Then, check if all required bits are readin 616. If no, generate one more RE pulse in 618 and go to step 608 toread more bits. If yes, the read procedure ends at 690.

To further reduce the footprint, the low-pin-count NVM can have aportion of the NVM be built under a bonding pad of PGM, CLK, VDDP, orany pins in an integrated circuit, in the so-called Circuit-Under-Pad(CUP) technology. The Electrostatic Discharge (ESD) protection can beintegrated into the low-pin-count NVM as well, particularly for VDDPpin.

FIG. 14 shows a processor electronic system 700 that employees at leastone low-pin-count NVM according to one embodiment. The processor system700 can include at least one NVM cell 744, such as in a cell array 742,in at least one low-pin-count NVM memory 740, according to oneembodiment. The processor system 700 can, for example, pertain to anelectronic system. The electronic system can include a Central ProcessUnit (CPU) 710, which communicate through a common bus 715 to variousmemory and peripheral devices such as I/O 720, hard disk drive 730,CDROM 750, low-pin-count NVM memory 740, and other memory 760. Othermemory 760 is a conventional memory such as SRAM, DRAM, or flash,typically interfaces to CPU 710 through a memory controller. CPU 710generally is a microprocessor, a digital signal processor, or otherprogrammable digital logic devices. Low-pin-count NVM 740 is preferablyconstructed as an integrated circuit, which includes the memory array742 having at least one programmable resistive device 744. Thelow-pin-count NVM memory 740 typically interfaces to CPU 710 through asimple bus. If desired, the memory 740 may be combined with theprocessor, for example CPU 710, in a single integrated circuit.

The invention can be implemented in a part or all of an integratedcircuit in a Printed Circuit Board (PCB), or in a system. Theprogrammable resistive device in a low-pin-count NVM can be an OTP(One-Time Programmable), FTP (Few-Time Programmable), MTP (Multiple-TimeProgrammable), Charge-storing nonvolatile memory, or emergingnonvolatile memory. The OTP can be fuse or anti-fuse, depending on theinitial resistance state being low or high, respectively, and the finalresistance is just the opposite. The fuse can include at least one ofthe silicided or non-silicided polysilicon, local interconnect, metal,metal alloy, metal-gate, polymetal, thermally isolated active area,contact, or via fuse. The anti-fuse can be a gate-oxide breakdownanti-fuse, contact or via anti-fuse with dielectrics in-between. Thecharge-storing nonvolatile memory can be EPROM, EEPROM, or flash memory.The emerging nonvolatile memory can be Magnetic RAM (MRAM), Phase ChangeMemory (PCM), Conductive Bridge RAM (CBRAM), Ferroelectric RAM (FRAM),or Resistive RAM (RRAM). Though the program mechanisms are different,their logic states can be distinguished by different resistance values.

The above description and drawings are only to be consideredillustrative of exemplary embodiments, which achieve the features andadvantages of the present invention. Modifications and substitutions ofspecific process conditions and structures can be made without departingfrom the spirit and scope of the present invention.

The many features and advantages of the present invention are apparentfrom the written description and, thus, it is intended by the appendedclaims to cover all such features and advantages of the invention.Further, since numerous modifications and changes will readily occur tothose skilled in the art, it is not desired to limit the invention tothe exact construction and operation as illustrated and described.Hence, all suitable modifications and equivalents may be resorted to asfalling within the scope of the invention.

It will be apparent to those skilled in the art that variousmodifications and variations can be made in the present inventionwithout departing from the spirit or scope of the inventions. Thus, itis intended that the present invention covers the modifications andvariations of this invention provided they come within the scope of theappended claims and their equivalents.

What is claimed is:
 1. A low-pin-count non-volatile memory (NVM)integrated in an integrated circuit, the NVM having a test mode, the NVMcomprising: one or more NVM cells; at least one of the NVM cellsincluding at least: an NVM element coupled to a first supply voltageline; and a selector coupled to the NVM element and a second supplyvoltage line having a select signal; and at least one test modedetection circuit to detect abnormal operational conditions and toactivate a test mode based on the detected abnormal operationalconditions, wherein at least one I/O or supply voltage pins of theintegrated circuit is configured to be used as the I/O or supply voltageof the NVM to generate at least one select signal to select at least oneNVM cells after the test mode is activated.
 2. The low-pin-count NVM asrecited in claim 1, wherein the integrated circuit has at least 2 pins,including input, output, program voltage supply, core voltage supply,and ground pins.
 3. The low-pin-count NVM as recited in claim 1, whereinthe low-pin-count NVM has no more than two (2) I/O signals, excludingprogram voltage supply, core voltage supply, and ground pins.
 4. Thelow-pin-count NVM as recited in claim 1, wherein the low-pin-count NVMis a One-Time Programmable (OTP) memory.
 5. The low-pin-count NVM asrecited in claim 4, wherein the OTP element has at least one of theelectrical fuse, anti-fuse, or floating-gate device.
 6. Thelow-pin-count NVM as recited in claim 5, wherein the electrical fuse canbe selected for programming with progressive resistance changes.
 7. Thelow-pin-count NVM as recited in claim 1, wherein the test mode detectioncircuit detects at least one pin out of the voltage or current range ofnormal operations.
 8. The low-pin-count NVM as recited in claim 1,wherein the test mode detection circuit detects at least one pin havinga different polarity in voltage or current than in normal operation. 9.The low-pin-count NVM as recited in claim 1, wherein the test modedetection circuit detects at least one pin with timing transitions inabnormal operations.
 10. The low-pin-count NVM as recited in claim 1,wherein the test mode detection circuit detects inductive or capacitivecoupling to get into the test mode.
 11. The low-pin-count NVM as recitedin claim 1, wherein the test mode detection circuit detects at least oneof the modes: idle, sleep, hibernation, shutdown, protection, or unusedtest modes.
 12. The low-pin-count NVM as recited in claim 1, wherein thetest mode detection circuit detects out of normal operational conditionsand latches into at least one register even when the out of normalconditions disappear.
 13. The low-pin-count NVM as recited in claim 1,wherein the at least one of the NVM cells comprise at least one outputregister, and wherein the at least one of the NVM cells are read intothe output register upon detecting the ramping of the first or thesecond supply voltage line.
 14. An electronic system, comprising: aprocessor; and at least one low-pin-count non-volatile memory (NVM)operatively connected to the processor, the NVM includes at least one ormore NVM cells for trimming, at least one of the NVM cells comprising:an NVM element coupled to a first supply voltage line; a selectorcoupled to the NVM element and a second supply voltage line having aselect signal; at least one test mode detection circuit to detect out ofnormal operational conditions to activate a test mode; and wherein atleast one I/O pins or supply voltages in the integrated circuit can beused to generate at least one select signal to select at least one ofthe NVM cells of the NVM while the test mode is activated.
 15. Anelectronic system as recited in claim 14, wherein the electronic systemincludes at least one integrated circuit package housing at least theNVM, the at least one integrated circuit package having externallyaccessible pins, and wherein test mode detection by the at least onetest mode detection circuit detects at least one of the externallyaccessible pins with range or polarity of voltage, current, or timingtransitions that can not be found in normal operations.
 16. Anelectronic system as recited in claim 14, wherein test mode detection bythe at least one test mode detection circuit detects abnormaloperational conditions for N times and latches into at least oneregister even when the abnormal conditions disappear, where 1<=N<=8. 17.A method for providing a low-pin-count nonvolatile memory (NVM) in anintegrated circuit comprises: providing one or more NVM cells, at leastone of the NVM cells comprising: an NVM element coupled to a firstsupply voltage line; a selector coupled to the NVM element and a secondsupply voltage line having a select signal; detecting abnormal operationconditions of the NVM; and activating a test mode if the detectingdetects the abnormal operation conditions, wherein at least one I/O orsupply voltages of the integrated circuit can be used as the I/O orsupply voltages of the NVM to select at least one of the NVM cells afterthe test mode is activated.
 18. A method as recited in claim 17, whereinthe detecting comprises detecting at least one pin out of range ordifferent polarity in voltage, current, timing transitions, or othermodes that should not be found in normal operations.
 19. A method asrecited in claim 17, wherein the detecting comprises detecting at leastone inductive or capacitive coupling that should not be found in normaloperations.
 20. A method as recited in claim 17, wherein the NVMundergoes at least one of the following procedures after activation ofthe test mode: (i) using at least one of the I/O pins of the integratedcircuit to start accessing at least one of the NVM cells; (ii) softprogramming data into the at least one of the NVM cells; (iii) testingif the performance of the integrated circuit improved after softprogram; and/or (iv) programming the data into the at least one of theNVM cells after the testing is shown to be satisfactory.